package com.nisure.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.nisure.annotation.DataSourceAnnotation;
import com.nisure.entities.FormCustomerEntity;
import com.nisure.mappers.FormCustomerMapper;
import com.nisure.service.FormCustomerService;
@Service("formCustomerService")
@Transactional
public class FormCustomerServiceImpl implements FormCustomerService{

	@Autowired
	private FormCustomerMapper formCustomerMapper;
	@Override
	@DataSourceAnnotation
	public Integer findMaxId(String dsId) {
		// TODO Auto-generated method stub
		Integer maxId = formCustomerMapper.findMaxId();
		return maxId;
	}
	@Override
	@DataSourceAnnotation
	public List<FormCustomerEntity> selectNeedHandleData(Map<String, Object> map, String dsId) {
		// TODO Auto-generated method stub
		List<FormCustomerEntity> list = formCustomerMapper.selectNeedHandleData(map);
		return list;
	}
	@Override
	@DataSourceAnnotation
	public int insertFormCustomer(FormCustomerEntity formCustomerEntity, String dsId) {
		// TODO Auto-generated method stub
		int id = formCustomerMapper.insertFormCustomer(formCustomerEntity);
		return id;
	}
	@Override
	@DataSourceAnnotation
	public void insertFormCustomers(List<FormCustomerEntity> list, String dsId) {
		// TODO Auto-generated method stub
		formCustomerMapper.insertFormCustomers(list);
	}
	@Override
	@DataSourceAnnotation
	public void updateFormCustomer(FormCustomerEntity formCustomerEntity, String dsId) {
		// TODO Auto-generated method stub
		formCustomerMapper.updateFormCustomer(formCustomerEntity);
	}
	@Override
	@DataSourceAnnotation
	public void deleteFormCustomer(Map<String, Object> map, String dsId) {
		// TODO Auto-generated method stub
		formCustomerMapper.deleteFormCustomer(map);
	}
	@Override
	@DataSourceAnnotation
	public void updateFormCustomers(List<FormCustomerEntity> list, String dsId) {
		// TODO Auto-generated method stub
		formCustomerMapper.updateFormCustomers(list);
	}
	@Override
	@DataSourceAnnotation
	public List<FormCustomerEntity> selectByParams(Map<String, Object> map, String dsId) {
		// TODO Auto-generated method stub
		List<FormCustomerEntity> list = formCustomerMapper.selectByParams(map);
		return list;
	}
	@Override
	@DataSourceAnnotation
	public Integer selectByParamsTotal(Map<String, Object> map, String dsId) {
		// TODO Auto-generated method stub
		Integer total = formCustomerMapper.selectByParamsTotal(map);
		return total;
	}
	@Override
	@DataSourceAnnotation
	public List<FormCustomerEntity> selectNeedData(Map<String, Object> map, String dsId) {
		// TODO Auto-generated method stub
		return formCustomerMapper.selectNeedData(map);
	}
	@Override
	@DataSourceAnnotation
	public Integer getNeedHandleData(Map<String, Object> map, String dsId) {
		// TODO Auto-generated method stub
		return formCustomerMapper.getNeedHandleData(map);
	}
	@Override
	@DataSourceAnnotation
	public List<FormCustomerEntity> selectNeedDataList(Map<String, Object> map, String dsId) {
		// TODO Auto-generated method stub
		return formCustomerMapper.selectNeedDataList(map);
	}

}
